import React from 'react';
import ReactDOM from 'react-dom';
import {createStore,applyMiddleware} from  'redux'
import routes from './router'
import thunk from 'redux-thunk'
import {Provider} from  'react-redux'
import {composeWithDevTools} from  'redux-devtools-extension'
import {ConfigProvider,message} from  'antd'
import zhCN from 'antd/lib/locale/zh_CN';
import './global.css'


// global.service=service
// const store=createStore(rootReduces,composeWithDevTools(applyMiddleware(thunk)))

// window.addEventListener('unhandledrejection',e=>{
//   const {response={},reason={}}=e;
//   const {code}=reason
//   message.error(response.data||reason.message)
//   if(code=='102'){
//     window.location='/login'
     
//   }
//   debugger;
//   window.location='/login'

// })


ReactDOM.render(
  <React.StrictMode>
   {routes}
   </React.StrictMode>
  ,
  document.getElementById('root')
);

